﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using _08_Mid_StatusStrip_ToolStrip.窗体;//引入窗体命名空间

namespace _08_Mid_StatusStrip_ToolStrip
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void 显示窗体ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Frm_Display frm_Display = new Frm_Display();
            frm_Display.MdiParent = this;//设置停靠的父窗体
            frm_Display.Show();//显示窗体

        }

        private void 日志窗体ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Frm_LogSystem frm_LogSystem = new Frm_LogSystem();
            frm_LogSystem.MdiParent = this;//设置停靠的父窗体
            frm_LogSystem.Show();//显示窗体
        }

        private void 统计结果ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Frm_Statistics frm_Statistics = new Frm_Statistics();
            frm_Statistics.MdiParent = this;//设置停靠的父窗体
            frm_Statistics.Show();//显示窗体

        }

        private void 运动控制ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Frm_ToolMenu frm_MotionControl = new Frm_ToolMenu();
            frm_MotionControl.MdiParent = this;//设置停靠的父窗体
            frm_MotionControl.Show();//显示窗体
        }

        /// <summary>
        /// 横向排列
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void 横向排列ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.LayoutMdi(MdiLayout.TileHorizontal);
        }

        /// <summary>
        /// 纵向排列
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void 纵向排列ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.LayoutMdi(MdiLayout.TileVertical);
        }
    }
}
